package cn.edu.njnu.controller;

import cn.edu.njnu.pojo.Result;
import cn.edu.njnu.service.DocumentService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.multipart.MultipartFile;


@RestController
@Slf4j
@RequestMapping("/e-resource/api")
public class DocumentController extends BaseController{
    @Autowired
    private DocumentService documentService;
    @PostMapping("/v1.0/public/docs")
    public Result getText(@RequestParam("file") MultipartFile file) {
        return documentService.KGGenerate(file);
    }
}
